﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace Splittergame.Model
{
    class CombinedSystem
    {
        SplitterSystem SplitterSystem;
        ExplosionSystem ExplosionSystem;
        SmokeSystem SmokeSystem;
        Shockwave Shockwave;
        Vector2 StartPosition;

        public CombinedSystem(Vector2 currentMousePosition)
        {
            StartPosition = currentMousePosition;
            SplitterSystem = new SplitterSystem(StartPosition);
            SmokeSystem = new SmokeSystem(StartPosition);
            Shockwave = new Shockwave(StartPosition);
            ExplosionSystem = new ExplosionSystem(StartPosition);
        }

        internal void LoadContent(ContentManager content)
        {
            SplitterSystem.LoadContent(content);
            SmokeSystem.LoadContent(content);
            Shockwave.LoadContent(content);
            ExplosionSystem.LoadContent(content);
        }

        internal void Update(GameTime gameTime)
        {
            SplitterSystem.Update(gameTime);
            SmokeSystem.Update(gameTime);
            Shockwave.Update(gameTime);
            ExplosionSystem.Update(gameTime);

        }

        internal void Draw(SpriteBatch spriteBatch, Camera camera)
        {

            SplitterSystem.Draw(spriteBatch, camera);
            SmokeSystem.Draw(spriteBatch, camera);
            Shockwave.Draw(spriteBatch, camera);
            ExplosionSystem.Draw(spriteBatch, camera);

        }

    }
}
